;(function($, window, document,undefined) {
    //定义Beautifier的构造函数
    var Foot = function(ele, opt) {
    this.$element = ele,
        this.defaults = {
            "status":"active",
            "color": "#5a5a5a",
            "selectedColor": "#00954A",
            "borderStyle": "none",
            "backgroundColor": "#fff",
            "list": [
                {
                    "pagePath": "www.baidu.com",
                    "iconPath": "../image/foot.png",
                    "text": "微信"
                },
                {
                    "pagePath": "foot01.html",
                    "iconPath": "../image/foot.png",
                    "text": "通讯录"
                },
                {
                    "pagePath": "www.php.cn",
                    "iconPath": "../image/foot.png",
                    "text": "发现"
                },
                {
                    "pagePath": "www.tianmao.com",
                    "iconPath": "../image/foot.png",
                    "text": "我的"
                }
            ]
        },
        this.options = $.extend({}, this.defaults, opt)
}
//定义Beautifier的方法
Foot.prototype = {
    footify: function() {
        var listLeng = this.options.list.length;
            var dom = "<div class='jy-foot'></div>";
            $("body").append(dom);
            var icon;
            if(this.options.list.length){
                for(var i=0; i<listLeng; i++){
                    var lidom = "<a href='"+this.options.list[i].pagePath+"' class='jy-foot-a ' id='"+i+"'>\n" +
                        "<img src='"+this.options.list[i].iconPath+"'>\n" +
                        "<p>"+this.options.list[i].text+"</p>\n" +
                        "</a>";

                    $(".jy-foot").append(lidom);

                }
            }
        return true;

    }
};
//在插件中使用Beautifier对象
$.fn.myPlugin = function(options) {
    //创建Beautifier的实体
    var foot = new Foot(this, options);
    //调用其方法
    return foot.footify();
}

})(jQuery, window, document);